#include "junix.h"

int main(int argc, char **argv)
{
	int fd=Open("/dev/pts/4",O_RDWR);
	ssize_t sz;
	char buf[LINE_MAX];

again:
	while ( (sz=read(STDIN_FILENO,buf, LINE_MAX)) > 0)
		if( write(fd, buf, sz) != sz )
			err_sys("wrire");

	if(sz <  0)
	{
		if(errno == EINTR)
			goto again;
		else 
			err_sys("read");
	}

	exit(0);
}

